package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"varchar(255)" json:"username"`
	Password string `gorm:"varchar(255)" json:"password"`
}
type UserRole struct {
	gorm.Model
	Uid int `json:"uid"`
	Rid int `json:"rid"`
}
type Role struct {
	gorm.Model
	RoleName string `gorm:"varchar(255)" json:"role_name"`
}
type RoleNode struct {
	gorm.Model
	Rid int `json:"rid"`
	Nid int `json:"nid"`
}
type Node struct {
	gorm.Model
	NodeName string `gorm:"varchar(255)" json:"node_name"`
}
type Car struct {
	gorm.Model
	CarName string `gorm:"varchar(255)" json:"car_name"`
	CarCode string `gorm:"varchar(255)" json:"car_code"`
	CarNum  string `gorm:"varchar(255)" json:"car_num"`
}
type Order struct {
	gorm.Model
	OrderNo     string `gorm:"varchar(255)" json:"order_no"`
	FromAddress string `gorm:"varchar(255)" json:"from_address"`
	ToAddress   string `gorm:"varchar(255)" json:"to_address"`
	Cid         int    `gorm:"int" json:"cid"`
}
type OrderList struct {
	CarName     string `json:"car_name"`
	CarCode     string `json:"car_code"`
	CarNum      string `json:"car_num"`
	OrderNo     string `json:"order_no"`
	FromAddress string `json:"from_address"`
	ToAddress   string `json:"to_address"`
}
